<template>
  <div class="anchor">
    <main-table>
      <div class="hot" slot="left">热门主播</div>
      <div slot="right"></div>
      <div slot="body">
        <!-- 盒子 -->
        <div class="anchor-box" v-for="(item, index) in hotanchor" :key="index">
          <div class="left">
            <el-image
              :src="item.avatarUrl"
              alt=""
              lazy
            />
          </div>
          <div class="right">
            <p><a href="javascript:;" >{{item.nickName}}</a></p>
            <p class="title">{{item.score}}</p>
          </div>
        </div>
      </div>
    </main-table>
  </div>
</template>

<script>
import mainTable from "../../../components/common/mainTable.vue";
export default {
  components: { mainTable },
  props: {
    hotanchor: {
      type: Array,
      default() {
        return []
      }
    }
  }
};
</script>

<style lang="scss" scoped>
.main-table {
  width: 210px;
  margin-left: 22.5px;
  margin-top: 35px;
  .hot {
    margin-bottom: 2px;
    color: black;
    font-size: 12px;
  }
  .anchor-box {
    display: flex;
    width: 210px;
    height: 40px;
    margin-top: 20px;
    .left {
      width: 40px;
      height: 40px;
      .el-image {
        width: 100%;
        height: 100%;
        &:hover {
          cursor: pointer;
        }
      }
    }
    .right {
      margin-left: 5px;
      display: flex;
      flex-direction: column;
      justify-content: space-around;
      a {
        color: #000;
        &:hover {
          text-decoration: underline;
        }
      }
      .title {
        color: #666;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        word-wrap: normal;
      }
    }
  }
}
</style>